package com.zhaoyd.uaademo.config.security.integration;

import org.apache.commons.lang3.StringUtils;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author zhaoyd
 * @date 2020-11-03 21:08
 */
public class IntegrationAuthentication {

    private String authType;

    private String password;

    private Map<String, String[]> parameterMap;

    public String getParameter(String key){
        if(parameterMap != null){
            String[] values = parameterMap.get(key);
            if(values != null && values.length>0){
                return StringUtils.join(values);
            }
        }
        return null;
    }


    public String getAuthType() {
        return authType;
    }

    public void setAuthType(String authType) {
        this.authType = authType;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Map<String, String[]> getParameterMap() {
        return parameterMap;
    }

    public void setParameterMap(Map<String, String[]> parameterMap) {
        this.parameterMap = parameterMap;
    }

}
